export const zhanfuConfig = {
  app: {
    app_key: '4139ffe8854b2325db47beb300ed5b8a',
    app_secret: 'FXFe1PVr6CjWDxKFFwA3KGklw50X6bsC4jNoKLuq',
    open_url: 'https://gw-open.zhanfubrowser.com/api/route'
  }
};

export const zhanfuApiUrl = {
  'rux.open.ai.image.create1': { // 场景图生成
    query: {
      imageUrl: {
        required: false,
        desc: '原图片链接',
        type: 'string',
        default: '',
        yilai: 'prompt'
      },
      style: {
        required: true,
        desc: '风格',
        type: 'string',
      },
      subType: {
        required: false,
        desc: '子类型 ',
        type: 'number',
        default: 4
      },
      prompt: {
        required: false,
        desc: '提示词',
        type: 'string',
        default: '',
        yilai: 'imageUrl'
      },
      ratio: {
        required: false,
        desc: '宽高比',
        type: 'number',
        default: 1,
        min: 0.0625,
        max: 16
      },
      outputNum: {
        required: false,
        desc: '输出数量',
        type: 'number',
        default: 1,
        min: 1,
        max: 1
      }
    }
  },
  'rux.open.ai.image.info1': { // 获取场景图生成结果
    query: {
      id: {
        required: true,
        desc: '任务ID',
        type: 'string'
      }
    }
  },
  'rux.open.ai.image.style': { // 获取风格/场景配置数据
    query: {
      showType: {
        required: false,
        desc: '展示类型',
        type: 'number',
        default: 0
      },
      type: {
        required: false,
        desc: '类型',
        type: 'number',
        default: 1
      }
    },
    jumpOredr: true
  },
  'rux.open.ai.image.create3': { // 智能抠图
    query: {
      imageUrl: {
        required: true,
        desc: '原图片链接',
        type: 'string'
      },
      subType: {
        required: false,
        desc: '子类型 1:通⽤ 2:⼈像 3:商品 9:服饰 12:头发 13:⼈脸',
        type: 'number',
        default: 3,
      },
      outputNum: {
        required: false,
        desc: '输出数量',
        type: 'number',
        default: 1,
        min: 1,
        max: 1
      }
    },
    // 需要的积分数量
    needIntegral: 10
  },
  'rux.open.ai.image.info3': { // 获取智能抠图结果
    query: {
      id: {
        required: true,
        desc: '任务ID',
        type: 'string'
      }
    }
  },
  'rux.open.ai.image.create10': { // 模特换场景
    query: {
      imageUrl: {
        required: true,
        desc: '原图片链接',
        type: 'string'
      },
      style: {
        required: true,
        desc: '风格',
        type: 'string'
      },
      outputNum: {
        required: false,
        desc: '输出数量',
        type: 'number',
        default: 4,
        min: 1,
        max: 4
      },
      extendFields: {
        required: true,
        desc: '扩展字段',
        type: 'object',
        query: {
          imageSegUrl: {
            required: true,
            desc: '抠图后的图片链接',
            type: 'string'
          },
          isDepth: {
            required: false,
            desc: '原图片分割类型',
            type: 'boolean',
            default: false
          }
        }
      }
    }
  },
  'rux.open.ai.image.info10': { // 获取模特换场景结果
    query: {
      id: {
        required: true,
        desc: '任务ID',
        type: 'string'
      }
    }
  },
  'rux.open.ai.image.create11': { // 商品图合成
    query: {
      imageUrl: {
        required: true,
        desc: '原图片链接',
        type: 'string'
      },
      style: {
        required: true,
        desc: '风格',
        type: 'string'
      },
      subType: {
        required: false,
        desc: '子类型 1:通⽤ 2:⼈像 3:商品 9:服饰 12:头发 13:⼈脸',
        type: 'number',
        default: 13
      },
      ratio: {
        required: false,
        desc: '宽高比',
        type: 'number',
        default: 1,
        min: 0.0625,
        max: 16
      },
      outputNum: {
        required: false,
        desc: '输出数量',
        type: 'number',
        default: 4,
        min: 1,
        max: 4
      },
      extendFields: {
        required: true,
        desc: '扩展字段',
        type: 'object',
        query: {
          imageSegUrl: {
            required: true,
            desc: '背景图片',
            type: 'string'
          },
          keepSegStruct: {
            required: false,
            desc: '保留抠图结构',
            type: 'boolean',
            default: true
          },
          segChangeWeight: {
            required: false,
            desc: '抠图权重',
            type: 'number',
            default: 0.5
          },
          originalImages: {
            required: false,
            desc: '原图片链接',
            type: 'array',
            default: [],
            query: {
              type: {
                required: false,
                desc: '原图片类型',
                type: 'number',
                default: '',
              },
              url: {
                required: false,
                desc: '原图片链接',
                type: 'string',
                default: ''
              }
            }
          }
        }
      }
    },
    // 需要的积分数量
    needIntegral: 10
  },
  'rux.open.ai.image.info11': { // 获取商品图合成结果
    query: {
      id: {
        required: true,
        desc: '任务ID',
        type: 'string'
      }
    }
  },
  'rux.open.ai.image.create13': { // 场景裂变
    query: {
      imageUrl: {
        required: true,
        desc: '原图片链接',
        type: 'string'
      },
      prompt: {
        required: false,
        desc: '描述',
        type: 'string'
      },
      ratio: {
        required: false,
        desc: '宽高比',
        type: 'number',
        default: 1,
        min: 0.0625,
        max: 16
      },
      outputNum: {
        required: false,
        desc: '输出数量',
        type: 'number',
        default: 4,
        min: 1,
        max: 4
      },
      extendFields: {
        required: true,
        desc: '扩展字段',
        type: 'object',
        query: {
          segImageUrl: {
            required: true,
            desc: '保留区域图链接',
            type: 'string'
          },
          strength: {
            required: false,
            desc: '强度',
            type: 'number',
            default: 0.7,
            min: 0.1,
            max: 1
          }
        }
      }
    }
  },
  'rux.open.ai.image.info13': { // 获取场景裂变结果
    query: {
      id: {
        required: true,
        desc: '任务ID',
        type: 'string'
      }
    }
  },
  'rux.open.ai.image.create9': { // Ai换模特
    query: {
      imageUrl: {
        required: true,
        desc: '原图片链接',
        type: 'string'
      },
      style: {
        required: true,
        desc: '模特类型 与自定义模特头部图必填其一 预设值 调用风格接口 type = 6',
        type: 'string'
      },
      outputNum: {
        required: false,
        desc: '输出数量',
        type: 'number',
        default: 1,
        min: 1,
        max: 10
      },
      extendFields: {
        required: true,
        desc: '扩展字段',
        type: 'object',
        query: {
          imageSegUrl: {
            required: true,
            desc: '保留区域图',
            type: 'string'
          },
          scene: {
            required: false,
            desc: '场景 可选预设场景（风格/场景配置接口 type=7）与自定义描述（限制600）',
            type: 'string',
            default: ''
          },
          modelPrompt: {
            required: false,
            desc: '模特特征参数 取模特特征接口数据 可多选 以、分隔',
            type: 'string',
            default: ''
          },
          modelMarketId: {
            required: false,
            desc: '模特市场id',
            type: 'string',
            default: ''
          },
          customModel: {
            required: false,
            desc: '自定义模特头部图',
            type: 'object',
            query: {
              modelHeadImageUrl: {
                required: true,
                desc: '自定义模特头部图 与预设模特类型必填其一',
                type: 'string'
              }
            }
          }

        }
      }
    }
  },
  'rux.open.ai.image.info9': { // 获取Ai换模特结果
    query: {
      id: {
        required: true,
        desc: '任务ID',
        type: 'string'
      }
    }
  },
  'rux.open.ai.image.create12': {
    query: {
      imageUrl: {
        required: true,
        desc: '原图片链接',
        type: 'string'
      },
      outputNum: {
        required: false,
        desc: '输出数量',
        type: 'number',
        default: 1,
        min: 1,
        max: 4
      },
      extendFields: {
        required: true,
        desc: '扩展字段',
        type: 'object',
        query: {
          denoiseStrength: {
            required: false,
            desc: '降噪强度',
            type: 'number',
            default: 0.7,
            min: 0,
            max: 1
          },
          sourceImageUrl: {
            required: true,
            desc: '原图抠出来的商品图，RGB三通道的值必须保留。 商品不透明，背景透明。',
            type: 'string'
          },
          targetImageUrl: {
            required: true,
            desc: '替换的目标商品图',
            type: 'string'
          }
        }
      }
    }
  },
  'rux.open.ai.image.info12': { // 获取Ai换模特结果
    query: {
      id: {
        required: true,
        desc: '任务ID',
        type: 'string'
      }
    }
  },
  'rux.open.ai.image.create8': { // 图片变高清
    query: {
      imageUrl: {
        required: true,
        desc: '原图片链接',
        type: 'string'
      },
      outputNum: {
        required: false,
        desc: '输出数量',
        type: 'number',
        default: 1,
        min: 1,
        max: 1
      }
    }
  },
  'rux.open.ai.image.info8': { // 获取图片变高清结果
    query: {
      id: {
        required: true,
        desc: '任务ID',
        type: 'string'
      }
    }
  },
  'rux.open.ai.image.create7': { // 图片无损变大
    query: {
      imageUrl: {
        required: true,
        desc: '原图片链接',
        type: 'string'
      },
      outputNum: {
        required: false,
        desc: '输出数量',
        type: 'number',
        default: 1,
        min: 1,
        max: 1
      },
      extendFields: {
        required: true,
        desc: '扩展字段',
        type: 'object',
        query: {
          magnification: {
            required: false,
            desc: '放大倍数',
            type: 'number',
            default: 2,
            min: 2,
            max: 4
          }
        }
      }
    }
  },
  'rux.open.ai.image.info7': { // 获取图片无损变大结果
    query: {
      id: {
        required: true,
        desc: '任务ID',
        type: 'string'
      }
    }
  },
  'rux.open.ai.image.processInteractCutout': { // 交互抠图过程
    query: {
      imageUrl: {
        required: true,
        desc: '原图片链接',
        type: 'string'
      },
      featureUrl: {
        required: false,
        desc: '全局分割图',
        type: 'string'
      },
      scoreUrl: {
        required: false,
        desc: '概率图',
        type: 'string'
      },
      pointList: {
        required: true,
        desc: '抠图区域坐标',
        type: 'array',
        query: {
          x: {
            required: true,
            desc: 'x坐标',
            type: 'number'
          },
          y: {
            required: true,
            desc: 'y坐标',
            type: 'number'
          },
          isSelect: {
            required: true,
            desc: '是否选中',
            type: 'boolean'
          }
        }
      }
    }
  },
  'rux.open.ai.image.generateUploadUrl': { // 生成图片上传地址
    query: {
      fileName: {
        required: true,
        desc: '文件名',
        type: 'string'
      }
    }
  },
  'rux.open.ai.image.create5': { //相似图裂变
    query: {
      imageUrl: {
        required: true,
        desc: '原图片链接',
        type: 'string'
      },
      prompt: {
        required: false,
        desc: '提示词',
        type: 'string',
        default: ''
      },
      extendFields: {
        required: true,
        desc: '扩展字段',
        type: 'object',
        query: {
          width: {
            required: false,
            desc: '宽度',
            type: 'number',
            default: '',
          },
          height: {
            required: false,
            desc: '高度',
            type: 'number',
            default: '',
          },
          scale: {
            required: false,
            desc: '比例',
            type: 'number',
            default: ''
          },
          weight: {
            required: false,
            desc: '权重',
            type: 'number',
            default: 1,
            min: 0,
            max: 2
          }
        }
      },
      outputNum: {
        required: false,
        desc: '输出数量',
        type: 'number',
        default: 1,
        min: 1,
      }
    }
  },
  'rux.open.ai.image.info5': { // 获取相似图裂变结果
    query: {
      id: {
        required: true,
        desc: '图片id',
        type: 'string'
      }
    }
  },
  'rux.open.ai.image.create15': { // 人台模特
    query: {
      imageUrl: {
        required: true,
        desc: '原图片链接',
        type: 'string'
      },
      style: {
        required: false,
        desc: '模特类型 与自定义模特头部图必填其一 预设值 调用风格接口 type = ',
        type: 'string',
        default: ''
      },
      outputNum: {
        required: false,
        desc: '输出数量',
        type: 'number',
        default: 1,
        min: 1,
        max: 4
      },
      extendFields: {
        required: false,
        desc: '扩展字段',
        type: 'object',
        query: {
          imageSegUrl: {
            required: false,
            desc: '保留区域图',
            type: 'string',
            default: ''
          },
          scene: {
            required: false,
            desc: '场景 可选预设场景（风格/场景配置接口 type=7）与自定义描述（限制600）',
            type: 'string',
            default: ''
          },
          customModel: {
            required: false,
            desc: '自定义模特头部图',
            type: 'object',
            default: '',
            query: {
              modelHeadImageUrl: {
                required: false,
                desc: '自定义模特头部图 与预设模特类型必填其一',
                type: 'string',
              }
            }
          }
        }
      }
    }
  },
  'rux.open.ai.image.info15': { // 获取人台模特结果
    query: {
      id: {
        required: true,
        desc: '图片id',
        type: 'string'
      }
    }
  },
  'rux.open.ai.image.getModelPromptProperties': { // 获取模特特征配置
    query: null
  },
  'rux.open.ai.image.processInteractErase': { // 交互消除笔过程
    query: {
      imageUrl: {
        required: true,
        desc: '原图片链接',
        type: 'string'
      },
      maskUrl: {
        required: false,
        desc: '涂鸦mask图片',
        type: 'string',
        default: ''
      }
    }
  },
  'rux.open.ai.image.getModelExclusive': { // 专属模特列表
    query: null
  },
  'rux.open.ai.image.getModelPostureList': { // 模特姿态列表
    query: null
  },
  'rux.open.ai.chat.completionCreate': { // AI非流会话
    query: {
      chatId: {
        required: false,
        desc: '会话id, 第二次会话时需要传入',
        type: 'number'
      },
      promptSystem: {
        required: false,
        desc: '系统预设模板',
        type: 'string',
        default: ''
      },
      content: {
        required: true,
        desc: '输入内容',
        type: 'string'
      },
      modelParam: {
        required: false,
        desc: '模型参数 1.gpt-35-turbo 2.gpt-35-turbo-16k 3.gpt-4 4.gpt-4-32k 默认 1',
        type: 'number'
      },
      checkSensitiveWord: {
        required: false,
        desc: '是否检查敏感词 默认false',
        type: 'boolean'
      },
      maxTokens: {
        required: false,
        desc: '最大生成token数 默认 100',
        type: 'number'
      },
      temperature: {
        required: false,
        desc: '生成文本的随机性 默认 0.7',
        type: 'number',
        min: 0,
        max: 2
      },
      topP: {
        required: false,
        desc: '生成文本的多样性 默认 1',
        type: 'number',
        min: 0,
        max: 1
      },
      stop: {
        required: false,
        desc: '停止序列。使模型在所需点结束响应。模型响应将在指定序列之前结束，因此不包含停止序列文本。对于 ChatGPT，使用 <|im_end|> 可确保模型响应不会生成后续用户查询。可以包含多达四个停止序列。',
        type: 'string',
      },
      frequencyPenalty: {
        required: false,
        desc: '频率惩罚 默认 0',
        type: 'number',
        min: 0,
        max: 2
      },
      presencePenalty: {
        required: false,
        desc: '存在惩罚 默认 0',
        type: 'number',
        min: 0,
        max: 2
      }
    },
    jumpOredr: true
  },
  'rux.open.ai.image.chatCompletionCreate3': { // 创建AI自由绘图-图生文 ***
    query: {
      content: {
        required: true,
        desc: '输入内容',
        type: 'object',
        query: {
          
        }
      }
    }
  },
  'rux.open.ai.image.chatCompletionInfo3': { // AI自由绘图-图生文获取结果
    query: {
      chatId: {
        required: true,
        desc: '会话id',
        type: 'number'
      }
    }
  }
}
